import vueRouter from 'vue-router'

import index from '../components/index/index.vue';

import home from '../components/index/home.vue';
import type from '../components/index/type.vue';
import search from '../components/index/search.vue';
import shopcar from '../components/index/shopcar.vue';
import my from '../components/index/my.vue';
import more from '../components/index/more.vue';



export default new vueRouter({
    routes:[
        {
            path:'/index',
            component:home,
            children:[
                {
                    path:'/index',
                    component:index,
                    children:[
                        
                    ]
                },
                {
                    path:'/search',
                    component:search
                },
                {
                    path:'/my',
                    component:my
                },
                {
                    path:'/more',
                    component:more
                }
            ]
        },
        {
            path:'/type',
            component:type
        },   
        {
            path:'/shopcar',
            component:shopcar
        },     
        {
            path:'/*',
            redirect:'/index'
        }
    ]

    
})


